package fr.afcepf.iziticket.services;

import java.util.List;

import fr.afcepf.iziticket.beans.MainManagedBean;
import fr.afcepf.iziticket.dao.interfaces.DAOCommande;
import fr.afcepf.iziticket.entities.Commande;

public class HistoriqueService {

	public List<Commande> getCommandesFromUtilisateur(int idUtil){
		
		DAOCommande dao = (DAOCommande) MainManagedBean.getContext().getBean("daoCommande");
		return dao.getCommandesByUtilisateur(idUtil);
		
	}
	
	private static HistoriqueService service;
	
	public static HistoriqueService getService(){
		if(service==null)
			service = new HistoriqueService();
		return service;
	}
	
	private HistoriqueService() {
	}
	
}
